package com.chushouya.manager.dto.admin.role;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.general.framework.core.enums.StatusEnum;
import com.general.framework.core.lang.Dates;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@ApiModel("角色列表DTO")
@Data
public class RoleListDTO {

    @ApiModelProperty("角色ID")
    private Long roleId;

    @ApiModelProperty("角色名称")
    private String roleName;

    @ApiModelProperty("角色权限字符串")
    private String roleKey;

    @ApiModelProperty("显示顺序")
    private Integer roleSort;

    @ApiModelProperty("角色状态（1正常 0停用）")
    private Integer status;

    @ApiModelProperty("角色状态（1正常 0停用）")
    private String statusDesc;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = Dates.FMT_FULL_TIME)
    private Date createTime;

    @ApiModelProperty("系统内置")
    private boolean systemInit;

    public String getStatusDesc() {
        return StatusEnum.getDesc(this.status);
    }
}
